import '../utils/concrete'
/* eslint-disable */
/* 查询总字典 */
export function selDictonary() {
  return concrete.module('SystemService').comboboxStore()
}

/* 查询对应的字典 */
export function selDictonaryValue(param) {
  const jLen = param.list.length
  return concrete.module('SystemService').comboboxStore().then(res => {
    for (var i = 0, iLen = res.length; i < iLen; i++) {
      if (res[i].id === 'zw') {
        for (var j1 = 0; j1 < jLen; j1++) {
          if (param.list[j1].record_zw !== undefined && param.list[j1].record_zw !== null) {
            for (var k1 = 0; k1 < res[i].comboboxDetailList.length; k1++) {
              if (param.list[j1].record_zw === res[i].comboboxDetailList[k1].id) {
                param.list[j1].record_zwname = res[i].comboboxDetailList[k1].value
              }
            }
          } else if (param.list[j1].zw !== undefined && param.list[j1].zw !== null) {
            for (var kk1 = 0; kk1 < res[i].comboboxDetailList.length; kk1++) {
              if (param.list[j1].zw === res[i].comboboxDetailList[kk1].id) {
                param.list[j1].zwname = res[i].comboboxDetailList[kk1].value
              }
            }
          } else {
            continue
          }
        }
      } else if (res[i].id === 'recordstate') {
        for (var j2 = 0; j2 < jLen; j2++) {
          if (param.list[j2].record_state !== undefined && param.list[j2].record_state !== null) {
            for (var k2 = 0; k2 < res[i].comboboxDetailList.length; k2++) {
              if (param.list[j2].record_state === res[i].comboboxDetailList[k2].id) {
                param.list[j2].record_statename = res[i].comboboxDetailList[k2].value
              }
            }
          }
        }
      } else if (res[i].id === 'xb') {
        for (var j3 = 0; j3 < jLen; j3++) {
          if (param.list[j3].record_xb !== undefined && param.list[j3].record_xb !== null) {
            for (var k3 = 0; k3 < res[i].comboboxDetailList.length; k3++) {
              if (param.list[j3].record_xb === res[i].comboboxDetailList[k3].id) {
                param.list[j3].record_xbname = res[i].comboboxDetailList[k3].value
              }
            }
          } else if (param.list[j3].xb !== undefined && param.list[j3].xb !== null) {
            for (var kk3 = 0; kk3 < res[i].comboboxDetailList.length; kk3++) {
              if (param.list[j3].xb === res[i].comboboxDetailList[kk3].id) {
                param.list[j3].xbname = res[i].comboboxDetailList[kk3].value
              }
            }
          } else {
            continue
          }
        }
      } else if (res[i].id === 'orgtype') {
        for (var j4 = 0; j4 < jLen; j4++) {
          if (param.list[j4].orgtype !== undefined && param.list[j4].orgtype !== null) {
            for (var k4 = 0; k4 < res[i].comboboxDetailList.length; k4++) {
              if (param.list[j4].orgtype === res[i].comboboxDetailList[k4].id) {
                param.list[j4].orgtypename = res[i].comboboxDetailList[k4].value
              }
            }
          }
        }
      } else if (res[i].id === 'enableflag') {
        for (var j5 = 0; j5 < jLen; j5++) {
          if (param.list[j5].status !== undefined && param.list[j5].status !== null) {
            for (var k5 = 0; k5 < res[i].comboboxDetailList.length; k5++) {
              if (param.list[j5].status === res[i].comboboxDetailList[k5].id) {
                param.list[j5].statusname = res[i].comboboxDetailList[k5].value
              }
            }
          } else if (param.list[j5].place_status !== undefined && param.list[j5].place_status !== null) {
            for (var kk5 = 0; kk5 < res[i].comboboxDetailList.length; kk5++) {
              if (param.list[j5].place_status === res[i].comboboxDetailList[kk5].id) {
                param.list[j5].place_statusname = res[i].comboboxDetailList[kk5].value
              }
            }
          } else if (param.list[j5].park_status !== undefined && param.list[j5].park_status !== null) {
            for (var kkk5 = 0; kkk5 < res[i].comboboxDetailList.length; kkk5++) {
              if (param.list[j5].park_status === res[i].comboboxDetailList[kkk5].id) {
                param.list[j5].park_statusname = res[i].comboboxDetailList[kkk5].value
              }
            }
          } else {
            continue
          }
        }
      } else if (res[i].id === 'orglevel') {
        for (var n1 = 0; n1 < jLen; n1++) {
          if (param.list[n1].orglevel !== undefined && param.list[n1].orglevel !== null) {
            for (var m1 = 0; m1 < res[i].comboboxDetailList.length; m1++) {
              if (param.list[n1].orglevel === res[i].comboboxDetailList[m1].id) {
                param.list[n1].orglevelname = res[i].comboboxDetailList[m1].value
              }
            }
          }
        }
      } else if (res[i].id === 'placetype') {
        for (var j6 = 0; j6 < jLen; j6++) {
          if (param.list[j6].place_type !== undefined && param.list[j6].place_type !== null) {
            for (var k6 = 0; k6 < res[i].comboboxDetailList.length; k6++) {
              if (param.list[j6].place_type === res[i].comboboxDetailList[k6].id) {
                param.list[j6].place_typename = res[i].comboboxDetailList[k6].value
              }
            }
          }
        }
      } else if (res[i].id === 'ori') {
        for (var j7 = 0; j7 < jLen; j7++) {
          if (param.list[j7].tcwz !== undefined && param.list[j7].tcwz !== null) {
            for (var k7 = 0; k7 < res[i].comboboxDetailList.length; k7++) {
              if (param.list[j7].tcwz === res[i].comboboxDetailList[k7].id) {
                param.list[j7].tcwz_name = res[i].comboboxDetailList[k7].value
              }
            }
          }else if(param.list[j7].park_dllx !== undefined && param.list[j7].park_dllx !== null) {
            for (var m2 = 0; m2 < res[i].comboboxDetailList.length; m2++) {
              if (param.list[j7].park_dlnc === res[i].comboboxDetailList[m2].id) {
                param.list[j7].park_dlncname = res[i].comboboxDetailList[m2].value
              }
            }
          }
        }
      } else if (res[i].id === 'tcsd') {
        for (var j8 = 0; j8 < jLen; j8++) {
          if (param.list[j8].tcsd !== undefined && param.list[j8].tcsd !== null) {
            for (var k8 = 0; k8 < res[i].comboboxDetailList.length; k8++) {
              if (param.list[j8].tcsd === res[i].comboboxDetailList[k8].id) {
                param.list[j8].tcsd_name = res[i].comboboxDetailList[k8].value
              }
            }
          }
        }
      } else if (res[i].id === 'roadkind') {
        for (var j9 = 0; j9 < jLen; j9++) {
          if (param.list[j9].roadkind !== undefined && param.list[j9].roadkind !== null) {
            for (var k9 = 0; k9 < res[i].comboboxDetailList.length; k9++) {
              if (param.list[j9].roadkind === res[i].comboboxDetailList[k9].id) {
                param.list[j9].roadkind_name = res[i].comboboxDetailList[k9].value
              }
            }
          }
        }
      } else if (res[i].id === 'roadtype') {
        for (var j10 = 0; j10 < jLen; j10++) {
          if (param.list[j10].roadtype !== undefined && param.list[j10].roadtype !== null) {
            for (var k10 = 0; k10 < res[i].comboboxDetailList.length; k10++) {
              if (param.list[j10].roadtype === res[i].comboboxDetailList[k10].id) {
                param.list[j10].roadtype_name = res[i].comboboxDetailList[k10].value
              }
            }
          } else if (param.list[j10].park_dllx !== undefined && param.list[j10].park_dllx !== null) {
            for (var kk10 = 0; kk10 < res[i].comboboxDetailList.length; kk10++) {
              if (param.list[j10].park_dllx === res[i].comboboxDetailList[kk10].id) {
                param.list[j10].park_dllxname = res[i].comboboxDetailList[kk10].value
              }
            }
          } else {
            continue
          }
        }
      }
      else if (res[i].id === 'sffs') {
        for (var n3 = 0; n3 < jLen; n3++) {
          if (param.list[n3].tcsd !== undefined && param.list[n3].tcsd !== null) {
            for (var m3 = 0; m3 < res[i].comboboxDetailList.length; m3++) {
              if (param.list[n3].park_sffs === res[i].comboboxDetailList[m3].id) {
                param.list[n3].park_sffsname = res[i].comboboxDetailList[m3].value
              }
            }
          }
        }
      }else if (res[i].id === 'jcfs') {
        for (var n4 = 0; n4 < jLen; n4++) {
          if (param.list[n4].tcsd !== undefined && param.list[n4].tcsd !== null) {
            for (var m4 = 0; m4 < res[i].comboboxDetailList.length; m4++) {
              if (param.list[n4].park_jcfs === res[i].comboboxDetailList[m4].id) {
                param.list[n4].park_jcfsname = res[i].comboboxDetailList[m4].value
              }
            }
          }
        }
      } else if (res[i].id === 'dllx') {
        for (var j11 = 0; j11 < jLen; j11++) {
          if (param.list[j11].dllx !== undefined && param.list[j11].dllx !== null) {
            for (var k11 = 0; k11 < res[i].comboboxDetailList.length; k11++) {
              if (param.list[j11].dllx === res[i].comboboxDetailList[k11].id) {
                param.list[j11].dllxname = res[i].comboboxDetailList[k11].value
              }
            }
          }
        }
      }else if (res[i].id === 'billflag') {
        for (var n5 = 0; n5 < jLen; n5++) {
          if (param.list[n5].account_billflag !== undefined && param.list[n5].account_billflag !== null) {
            for (var m5 = 0; m5 < res[i].comboboxDetailList.length; m5++) {
              if (param.list[n5].account_billflag === res[i].comboboxDetailList[m5].id) {
                param.list[n5].account_billflagname = res[i].comboboxDetailList[m5].value
              }
            }
          }
        }
      } else {
        continue
      }
    }
    return param
  })
}
